[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setrgbpalette()         Set Colors for IBM-8514 and VGA 255 Color Mode

 #include   <graphics.h>

 void far setrgbpalette(colornum, red, green, blue);
 int colornum;          Color number to set (0-255)
 int red;               Red value
 int green;             Green value
 int blue;              Blue value

        This function sets palette entry colornum to the values in red,
        green, and blue (only the lower six bits are used). This function
        also works for the VGA in 255-color mode.

    Returns:    Nothing.

   -------------------------------- Example ---------------------------------

    The following statements change color 1 in the VGA palette to strong
    red.

     #include <graphics.h>
     #include <stdlib.h>

     int main(void)
     {
        int gdriver = VGA, gmode = VGAHI;

        initgraph(&gdriver, &gmode, "");

        setrgbpalette(1, 63, 0, 0);

        getch();
        closegraph();
        return 0;
     }

See Also: setpalette()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson